3.221 \(\int \frac {a+b \log (c (d+e x)^n)}{(f+g x) (h+i x)} \, dx\)

Optimal. Leaf size=155 \[ \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g h-f i}-\frac {\log \left (\frac {e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g h-f i}+\frac {b n \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{g h-f i}-\frac {b n \text {Li}_2\left (-\frac {i (d+e x)}{e h-d i}\right )}{g h-f i} \]

[Out]

(a+b*ln(c*(e*x+d)^n))*ln(e*(g*x+f)/(-d*g+e*f))/(-f*i+g*h)-(a+b*ln(c*(e*x+d)^n))*ln(e*(i*x+h)/(-d*i+e*h))/(-f*i
+g*h)+b*n*polylog(2,-g*(e*x+d)/(-d*g+e*f))/(-f*i+g*h)-b*n*polylog(2,-i*(e*x+d)/(-d*i+e*h))/(-f*i+g*h)

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2418, 2394, 2393, 2391} \[ \frac {b n \text {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g h-f i}-\frac {b n \text {PolyLog}\left (2,-\frac {i (d+e x)}{e h-d i}\right )}{g h-f i}+\frac {\log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g h-f i}-\frac {\log \left (\frac {e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g h-f i} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])/((f + g*x)*(h + i*x)),x]

[Out]

((a + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)])/(g*h - f*i) - ((a + b*Log[c*(d + e*x)^n])*Log[(e*(
h + i*x))/(e*h - d*i)])/(g*h - f*i) + (b*n*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/(g*h - f*i) - (b*n*PolyLo
g[2, -((i*(d + e*x))/(e*h - d*i))])/(g*h - f*i)

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{(h+221 x) (f+g x)} \, dx &=\int \left (\frac {221 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(221 f-g h) (h+221 x)}-\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )}{(221 f-g h) (f+g x)}\right ) \, dx\\ &=\frac {221 \int \frac {a+b \log \left (c (d+e x)^n\right )}{h+221 x} \, dx}{221 f-g h}-\frac {g \int \frac {a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{221 f-g h}\\ &=\frac {\log \left (-\frac {e (h+221 x)}{221 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{221 f-g h}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{221 f-g h}-\frac {(b e n) \int \frac {\log \left (\frac {e (h+221 x)}{-221 d+e h}\right )}{d+e x} \, dx}{221 f-g h}+\frac {(b e n) \int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{221 f-g h}\\ &=\frac {\log \left (-\frac {e (h+221 x)}{221 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{221 f-g h}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{221 f-g h}+\frac {(b n) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{221 f-g h}-\frac {(b n) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {221 x}{-221 d+e h}\right )}{x} \, dx,x,d+e x\right )}{221 f-g h}\\ &=\frac {\log \left (-\frac {e (h+221 x)}{221 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{221 f-g h}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{221 f-g h}-\frac {b n \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{221 f-g h}+\frac {b n \text {Li}_2\left (\frac {221 (d+e x)}{221 d-e h}\right )}{221 f-g h}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 111, normalized size = 0.72 \[ \frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (\log \left (\frac {e (f+g x)}{e f-d g}\right )-\log \left (\frac {e (h+i x)}{e h-d i}\right )\right )+b n \text {Li}_2\left (\frac {g (d+e x)}{d g-e f}\right )-b n \text {Li}_2\left (\frac {i (d+e x)}{d i-e h}\right )}{g h-f i} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/((f + g*x)*(h + i*x)),x]

[Out]

((a + b*Log[c*(d + e*x)^n])*(Log[(e*(f + g*x))/(e*f - d*g)] - Log[(e*(h + i*x))/(e*h - d*i)]) + b*n*PolyLog[2,
 (g*(d + e*x))/(-(e*f) + d*g)] - b*n*PolyLog[2, (i*(d + e*x))/(-(e*h) + d*i)])/(g*h - f*i)

________________________________________________________________________________________

fricas [F]  time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}{g i x^{2} + f h + {\left (g h + f i\right )} x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)/(i*x+h),x, algorithm="fricas")

[Out]

integral((b*log((e*x + d)^n*c) + a)/(g*i*x^2 + f*h + (g*h + f*i)*x), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}{{\left (g x + f\right )} {\left (i x + h\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)/(i*x+h),x, algorithm="giac")

[Out]

integrate((b*log((e*x + d)^n*c) + a)/((g*x + f)*(i*x + h)), x)

________________________________________________________________________________________

maple [C]  time = 0.31, size = 647, normalized size = 4.17 \[ \frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right ) \ln \left (g x +f \right )}{2 f i -2 g h}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right ) \ln \left (i x +h \right )}{2 \left (f i -g h \right )}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \ln \left (g x +f \right )}{2 \left (f i -g h \right )}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \ln \left (i x +h \right )}{2 f i -2 g h}-\frac {i \pi b \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \ln \left (g x +f \right )}{2 \left (f i -g h \right )}+\frac {i \pi b \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \ln \left (i x +h \right )}{2 f i -2 g h}+\frac {i \pi b \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} \ln \left (g x +f \right )}{2 f i -2 g h}-\frac {i \pi b \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} \ln \left (i x +h \right )}{2 \left (f i -g h \right )}+\frac {b n \ln \left (\frac {d g -e f +\left (g x +f \right ) e}{d g -e f}\right ) \ln \left (g x +f \right )}{f i -g h}-\frac {b n \ln \left (\frac {d i -e h +\left (i x +h \right ) e}{d i -e h}\right ) \ln \left (i x +h \right )}{f i -g h}+\frac {b n \dilog \left (\frac {d g -e f +\left (g x +f \right ) e}{d g -e f}\right )}{f i -g h}-\frac {b n \dilog \left (\frac {d i -e h +\left (i x +h \right ) e}{d i -e h}\right )}{f i -g h}-\frac {b \ln \relax (c ) \ln \left (g x +f \right )}{f i -g h}+\frac {b \ln \relax (c ) \ln \left (i x +h \right )}{f i -g h}-\frac {b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right )}{f i -g h}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (i x +h \right )}{f i -g h}-\frac {a \ln \left (g x +f \right )}{f i -g h}+\frac {a \ln \left (i x +h \right )}{f i -g h} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*(e*x+d)^n)+a)/(g*x+f)/(i*x+h),x)

[Out]

-b*ln((e*x+d)^n)/(f*i-g*h)*ln(g*x+f)+b*ln((e*x+d)^n)/(f*i-g*h)*ln(i*x+h)-b*n/(f*i-g*h)*dilog(((i*x+h)*e+d*i-e*
h)/(d*i-e*h))-b*n/(f*i-g*h)*ln(i*x+h)*ln(((i*x+h)*e+d*i-e*h)/(d*i-e*h))+b*n/(f*i-g*h)*dilog((d*g-e*f+(g*x+f)*e
)/(d*g-e*f))+b*n/(f*i-g*h)*ln(g*x+f)*ln((d*g-e*f+(g*x+f)*e)/(d*g-e*f))-1/2*I*b*Pi*csgn(I*c*(e*x+d)^n)^3/(f*i-g
*h)*ln(i*x+h)+1/2*I*b*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2/(f*i-g*h)*ln(i*x+h)+1/2*I*b*Pi*csgn(I*c)*csgn(I*(e*x+
d)^n)*csgn(I*c*(e*x+d)^n)/(f*i-g*h)*ln(g*x+f)-1/2*I*b*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)/(f*i-
g*h)*ln(i*x+h)-1/2*I*b*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2/(f*i-g*h)*ln(g*x+f)+1/2*I*b*Pi*csgn(I*c*(e*x+d)^n)^3
/(f*i-g*h)*ln(g*x+f)+1/2*I*b*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2/(f*i-g*h)*ln(i*x+h)-1/2*I*b*Pi*csgn(I*
(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2/(f*i-g*h)*ln(g*x+f)-b*ln(c)/(f*i-g*h)*ln(g*x+f)+b*ln(c)/(f*i-g*h)*ln(i*x+h)-a
/(f*i-g*h)*ln(g*x+f)+a/(f*i-g*h)*ln(i*x+h)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a {\left (\frac {\log \left (g x + f\right )}{g h - f i} - \frac {\log \left (i x + h\right )}{g h - f i}\right )} + b \int \frac {\log \left ({\left (e x + d\right )}^{n}\right ) + \log \relax (c)}{g i x^{2} + f h + {\left (g h + f i\right )} x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)/(i*x+h),x, algorithm="maxima")

[Out]

a*(log(g*x + f)/(g*h - f*i) - log(i*x + h)/(g*h - f*i)) + b*integrate((log((e*x + d)^n) + log(c))/(g*i*x^2 + f
*h + (g*h + f*i)*x), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{\left (f+g\,x\right )\,\left (h+i\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d + e*x)^n))/((f + g*x)*(h + i*x)),x)

[Out]

int((a + b*log(c*(d + e*x)^n))/((f + g*x)*(h + i*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a + b \log {\left (c \left (d + e x\right )^{n} \right )}}{\left (f + g x\right ) \left (h + i x\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(g*x+f)/(i*x+h),x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))/((f + g*x)*(h + i*x)), x)

________________________________________________________________________________________